package com.ax.dubboxtest.service;

import java.util.List;

import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
import com.ax.dubboxtest.entity.User;
@Path("demo")
@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML,MediaType.TEXT_PLAIN})
@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
public interface RestApiService {
	@GET
	@Path("{id}/{name}")
	String sayHello(@PathParam("id") String id, @PathParam("name") String name);
	@GET
	@Path("getUsers")
	public List<User> getUsers();
	
	@GET
	@Path("save")
	public void save(@NotNull User user);
	
	@GET
	@Path("findbyId")
	public User findbyId(int id);
}
